﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CuaHangLego.Bussiness
{
    public class TConvert
    {
        public static string CSDateTimeToSQL(DateTime date)
        {
            return date.ToString("yyyy-MM-dd HH:mm:ss");
        }

        public static DateTime SQLDataTimeToCS(string sqldate)
        {
            return DateTime.ParseExact(sqldate, "yyyy-MM-dd hh:mm:ss", CultureInfo.InvariantCulture);
        }
    }
}
